<template>
  <div>
    <h3>News的子组件</h3>
    <p>姓名：{{ name }}</p>
    <p>身价：{{ price }}</p>
  </div>
</template>

<script>
export default {
  name: "Item",
  props: ["a", "b", "name", "price"],
  mounted() {
    // 查看接收的props传递的参数
    console.log(this.a, this.b, "a,b");
    console.log(this.name, this.price, "name,price");
  },
};
</script>

<style></style>
